package com.databasir.core.diff.processor;

import com.databasir.core.diff.data.FieldDiff;
import com.databasir.core.meta.data.ForeignKeyMeta;

import java.util.List;

public class ForeignKeysDiffProcessor implements DiffProcessor<ForeignKeyMeta>{
    @Override
    public FieldDiff process(String fileName, List<ForeignKeyMeta> original, List<ForeignKeyMeta> current) {
        return diffTableField(original,current,"foreignKeys",
                fk->fk.getFkTableName()+"."+fk.getFkColumnName()+"."+fk.getKeySeq());
    }
}
